﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="AddRecipe.aspx.vb" Inherits="mybaconrecipe.AddRecipe" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
     <h1>Add Recipe</h1>
    <table cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>Name</td>
        <td><asp:TextBox ID="tb_RecipeName" runat="server"></asp:TextBox></td>
    </tr>
    <tr>
        <td>Type</td>
        <td>
            <asp:DropDownList ID="ddl_RecipeType" runat="server" 
                DataSourceID="SqlDataSource1" DataTextField="TYPE_DESC" 
                DataValueField="TYPE_ID">
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:recipeConnectionString %>" 
                ProviderName="<%$ ConnectionStrings:recipeConnectionString.ProviderName %>" 
                SelectCommand="SELECT [TYPE_DESC], [TYPE_ID] FROM [TYPE]">
            </asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td>Star Rating</td>
        <td>
            <asp:RadioButtonList ID="rbl_RecipeStars" runat="server" RepeatDirection="Horizontal">
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
            </asp:RadioButtonList>
        </td>
    </tr><tr>
        <td>Serves</td>
        <td><asp:TextBox ID="tb_RecipeServes" runat="server"></asp:TextBox></td>
    </tr><tr>
        <td>Preparation Time</td>
        <td><asp:TextBox ID="tb_RecipeTime" runat="server"></asp:TextBox></td>
    </tr>
        <tr>
        <td>Description</td>
        <td><asp:TextBox ID="tb_RecipeDescription" runat="server"></asp:TextBox></td>
    </tr>
    <tr>
        <td>Video URL</td>
        <td><asp:TextBox ID="tb_RecipeVidURL" runat="server"></asp:TextBox></td>
    </tr>
    <tr>
        <td>Image</td>
        <td>
            <asp:FileUpload ID="fup_RecipeImage" runat="server" />
            </td>
    </tr>
    <tr>
        <td>Choose one of our existing tags</td>
        <td>
            <asp:CheckBoxList ID="chk_RecipeTag" runat="server" 
                DataSourceID="tagsDataSource" DataTextField="TAG" DataValueField="TAG_ID" 
                RepeatDirection="Horizontal">
            </asp:CheckBoxList>
            <asp:SqlDataSource ID="tagsDataSource" runat="server" 
                ConnectionString="<%$ ConnectionStrings:recipeConnectionString %>" 
                ProviderName="<%$ ConnectionStrings:recipeConnectionString.ProviderName %>" 
                SelectCommand="SELECT [TAG_ID], [TAG] FROM [TAG]"></asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td>Or add your own tags (separated by a comma)</td>
        <td>
            <asp:TextBox ID="tb_RecipeNewTags" runat="server"></asp:TextBox></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td></td>
        <td>
            <asp:Button ID="btn_AddRecipe" runat="server" Text="Add New Recipe" />
        </td>
    </tr>
    </table>
        <p>
            &nbsp;</p>
</asp:Content>
